﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace ERP.Workflow.Designer.Domain
{
    /// <summary>
    /// 流程定义
    /// </summary>
    public class Definition : AggregateRoot<Guid>, IMultiTenant, ISoftDelete
    {
        
        /// <summary>
        /// 流程名
        /// </summary>
        public string? Name { get; set; } = "流程名称";
        /// <summary>
        /// 流程版本
        /// </summary>
        public string? Version { get; set; }

        public Guid? TenantId { get; set; }

        public List<Node> Nodes { get; set; }=new List<Node>();

        public List<Link> Links { get; set; } = new List<Link>();


        public List<Port> Ports { get; set; } = new List<Port>();
        public List<LinkVertex> Vertices { get; set; } = new List<LinkVertex>();
        public List<LinkLabel> Labels { get; set; } = new List<LinkLabel>();
        public bool IsDeleted { get; set; }

        public void Set(string? name=null, string? version=null)
        {
            this.Name = name;
            this.Version = version;
        }
        

    }


}
